package com.yqya.springboot.shiro.practice.service.impl;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yqya.springboot.shiro.practice.dao.UserInfoMapper;
import com.yqya.springboot.shiro.practice.domain.UserInfo;
import com.yqya.springboot.shiro.practice.dto.UserInfoDTO;
import com.yqya.springboot.shiro.practice.service.UserInfoService;

/**
 * 用户信息服务接口实现类
 *
 * @author Kevin
 * @date 2019-07-28
 */
@Service
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> implements UserInfoService {

    @Override
    public UserInfo findByName(String name) {
        QueryWrapper<UserInfo> wrapper = new QueryWrapper<>();
        wrapper.eq("name", name);

        UserInfo item = getOne(wrapper, false);
        return item;
    }

}
